/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aqu.persistencia.entity;

import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author angelquingaluisa
 */
@Entity
@Table(name = "seg_perfil")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "SegPerfil.findAll", query = "SELECT s FROM SegPerfil s"),
    @NamedQuery(name = "SegPerfil.findBySegCodigoPer", query = "SELECT s FROM SegPerfil s WHERE s.segCodigoPer = :segCodigoPer"),
    @NamedQuery(name = "SegPerfil.findBySegNombrePer", query = "SELECT s FROM SegPerfil s WHERE s.segNombrePer = :segNombrePer"),
    @NamedQuery(name = "SegPerfil.findBySegDescripcionPer", query = "SELECT s FROM SegPerfil s WHERE s.segDescripcionPer = :segDescripcionPer")})
public class SegPerfil implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @NotNull
    @Size(min = 1, max = 8)
    @Column(name = "SEG_CODIGO_PER")
    private String segCodigoPer;
    @Size(max = 45)
    @Column(name = "SEG_NOMBRE_PER")
    private String segNombrePer;
    @Size(max = 50)
    @Column(name = "SEG_DESCRIPCION_PER")
    private String segDescripcionPer;
    
    public SegPerfil() {
    }

    public SegPerfil(String segCodigoPer) {
        this.segCodigoPer = segCodigoPer;
    }

    public String getSegCodigoPer() {
        return segCodigoPer;
    }

    public void setSegCodigoPer(String segCodigoPer) {
        this.segCodigoPer = segCodigoPer;
    }

    public String getSegNombrePer() {
        return segNombrePer;
    }

    public void setSegNombrePer(String segNombrePer) {
        this.segNombrePer = segNombrePer;
    }

    public String getSegDescripcionPer() {
        return segDescripcionPer;
    }

    public void setSegDescripcionPer(String segDescripcionPer) {
        this.segDescripcionPer = segDescripcionPer;
    }

    

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (segCodigoPer != null ? segCodigoPer.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SegPerfil)) {
            return false;
        }
        SegPerfil other = (SegPerfil) object;
        if ((this.segCodigoPer == null && other.segCodigoPer != null) || (this.segCodigoPer != null && !this.segCodigoPer.equals(other.segCodigoPer))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "clases.SegPerfil[ segCodigoPer=" + segCodigoPer + " ]";
    }
    
}
